package com.yanqu.road.server.cmd.activity.union.task;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.union.cross.CrossUnionActivityTaskProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.CrossUnionActivityTaskMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_UNION_ACTIVITY_TASK_GET_DATA, desc = "获取商会任务进度")
public class GetUnionActivityTaskCmd extends CrossUnionCommand {

    private CrossUnionActivityTaskProto.GetUnionActivityTaskReqMsg msg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = CrossUnionActivityTaskProto.GetUnionActivityTaskReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossUnionActivityTaskMgr.getUnionActivityTaskData(
                packet.getPlayerId(),
                msg.getUnionUid(),
                serverId,
                msg.getActivityId()
        );
    }

    @Override
    public void sendData() {

    }
}
